
CXXFLAGS = -O2 -g -Wall -fmessage-length=0 $(INCLUDES)
LDFLAGS  = -shared

COMN_DIR=../comn
THIRD_PARTY = ../third_party


SOURCE = $(wildcard *.cpp src/*.cpp util/*.cpp core/*.cpp  sdl/*.cpp)
OBJS =	$(SOURCE:.cpp=.o)

INCLUDES = -I. \
	-I./include -I./util -I./core -I./src -I./win \
	-I./include -I./src \
	-I$(COMN_DIR)/include \
	-I${THIRD_PARTY}/ffmpeg/include \
	-I${THIRD_PARTY}/SDL2-2.0.4/include \

	
LIBS = -lpthread \
	-L$(COMN_DIR)/lib -lcomn \
	-L${THIRD_PARTY}/ffmpeg/bin -L${THIRD_PARTY}/ffmpeg/lib \
	-lswscale -lavutil -lavformat -lavcodec -lswresample \
	-lGdi32 -lole32 \
	-L${THIRD_PARTY}/SDL2/lib/x86 -lSDL2\
	

TARGET = ../bin/libLitePlayer.so

$(TARGET):	$(OBJS)
	$(CXX) -o $(TARGET) $(OBJS) $(LIBS) $(LDFLAGS)

all:	$(TARGET)

clean:
	rm -f $(OBJS) $(TARGET)
